import re


def GetRealImagePathUrl(url):
    try:
        st2 = url
        pattern = "KEY.*?(?=(&|$))"
        result = re.search(pattern, st2)
        Key1 = result.group().split("-")[0].split("KEY=")[1]
        Key122 = re.sub('[a-zA-Z]', "", Key1)
        Key1221 = re.sub(pattern, "KEY=" + str(int(Key122)), st2)
        return Key1221
    except:
        print("替换报错：：", url)
